<template>
	<view class="page">
		<view class="imgBox">
			<view class="title"  v-if ="type == 1">支付成功</view>
			<view class="title" v-if ="type == 2">支付失败</view>
			<image src="/static/img/pay_sucess.png" v-if="type == 1" mode="" class="resultImg"></image>
			<image src="/static/img/pay_fail.png"  v-if="type == 2" mode="" class="resultImg"></image>
			<view class="bts">
				<view class="bt bt-a" @tap="goOrder" v-if="type == 1">
					查看订单
				</view>
				<view class="bt bt-a" @tap="goBlack" v-if="type == 2">
					返回订单
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				type:1
			}
		},
		onLoad() {
			this.type = this.$Route.query.type;
		},
		methods: {
			goOrder() {
				this.$Router.replace('/pages/orders/orders')
			},
			goBlack() {
				this.$Router.replace('/pages/orders/orders')
			}
		}
	}
</script>

<style lang="scss">
  .page {
	  width: 100%;
	  height: 100%;
	  padding-top: 50rpx;
	  .title {
		  padding: 160rpx 0 40rpx;
		  font-size: 42rpx;
		  text-align: center;
		  color:#3c84f4;
		  font-weight: bold;
	  }
  }
  .resultImg {
	  width: 464rpx;
	  height: 457rpx;
	  display: block;
	  margin: 0 auto;
  }
  .bts {
	  padding-top: 155rpx;
	  @include bt-s-1();
  }
</style>
